Attributes


All script items share a common set of attributes. These attributes can be edited within each item's Info window. Attributes fall into the following categories:

System Rules

System Rules View

System Rules determine whether or not to install an item based on the user's configuration. Using system rules, you can optionally install an item based on memory, system version, color, FPU, and CPU. If multiple System Rules are set for an item, the item will not be installed if any of them fail. System Rules are ignored in the installer when the user chooses an installation that has its Ignore System Rules attribute set. System Rules can be edited when the Rules tab is clicked in the Attributes tab area. Clicking this tab reveals the following items:

Rules List
This list displays the System Rules that are currently set for the script item. You can modify this list using the Set... and Clear buttons.
Set...
This button opens the Rules Editor window. Changes made in this window are reflected in the Rules List.
Clear
This button clears the Rules List.

Gestalt Tests

Gestalt Test View

Gestalt Tests determine whether or not to install an item based on the MacOS Gestalt function. This function takes a four-character selector code and returns a value based on the user's configuration. For example, if Gestalt is called with the selector 'sysa' (System Architecture), the system returns a value of 1 for 680x0-based machines and 2 for PowerPC-based machines.

The Gestalt Test window lets you select one of DragInstall's predefined Gestalt Tests or create a custom test of your own. If multiple Gestalt Tests are set for an item, the item will not be installed if any of them fail. Gestalt Tests can be edited when the Gestalt tab is clicked in the Attributes tab area. Clicking this tab reveals the following items:

Gestalt Test List
This list displays the Gestalt Tests that are currently set for the script item. You can modify the contents of the list using the New..., Edit, and Delete buttons. For predefined Gestalt Tests, the name of the test is shown in the list. For custom tests, the actual selector code and comparison are shown.
New...
This button creates a new Gestalt Test and opens the Gestalt Test window. If the Gestalt Test is saved, it is added to the list.
Edit
This button opens the Gestalt Test window to edit the selected Gestalt Test. If the Gestalt Test is saved, any changes are reflected in the list.
Delete
This button deletes the selected Gestalt Test from the list, removing this test from the script item.

Result Tests

Result Test View

Result Tests determine whether or not to install an item based on the results of previous script items. A result test consists of a four-character result signature and a comparison. In many ways, result signature are like variables, and result tests are like "If" statements.

Two of DragInstall script items currently set results which can be tested. The Message item usually sets the signature 'mess' (although this can be changed), and the Find item sets the signature 'find'. If you are writing your own XRays, you can get and set results by using the xrGetData and xrSetData callbacks. See the Writing XRays section of this guide for details. The Result Test window lets you select one of DragInstall's predefined Result Tests or create a custom test of your own. If multiple Result Tests are set for an item, the item will not be installed if any of them fail. Result Tests can be edited when the Result tab is clicked in the Attributes tab area. Clicking this tab reveals the following items:

Result Test List
This list displays the Result Tests that are currently set for the script item. You can modify the contents of the list using the New..., Edit, and Delete buttons. For predefined Result Tests, the name of the test is shown in the list. For custom tests, the actual result signature and comparison are shown.
New...
This button creates a new Result Test and opens the Result Test window. If the Result Test is saved, it is added to the list.
Edit
This button opens the Result Test window to edit the selected Result Test. If the Result Test is saved, any changes are reflected in the list.
Delete
This button deletes the selected Result Test from the list, removing this test from the script item.

Before XRays

Before XRay View

Before XRays are DragInstall Extensions which are called before an item is installed. Before XRays can be used to detect some condition on the user's machine and stop installation of the item based on that condition. Before XRays can also be used to take some action before an item is installed.

If an item is not installed because it failed to meet one of its System Rules, Gestalt Tests, or Result Tests, then its Before XRays are not executed. If multiple Before XRays are set for an item, the XRays are executed in the order that they appear in the list. Before XRays can be edited when the Before tab is clicked in the Attributes tab area. Clicking this tab reveals the following items:

Before XRay List
This list displays the Before XRays that are currently set for the script item. You can modify the contents of the list using the New..., Edit, and Delete buttons.
New...
This button creates a new Before XRay and opens the XRay Editor window. If the Before XRay is saved, it is added to the list.
Edit
This button opens the XRay Editor window to edit the selected XRay. If the XRay is changed and saved, this change is reflected in the list.
Delete
This button deletes the selected XRay from the list, removing it from the script item.

After XRays

After XRay View

After XRays are DragInstall Extensions which are called after an item is installed. After XRays can be used to modify the item just installed. After XRays can also be used to take some other action after the item is installed.

If an item is not installed because it failed to meet one of its System Rules, Gestalt Tests, or Result Tests, then its After XRays are not executed. If multiple After XRays are set for an item, the XRays are executed in the order that they appear in the list. After XRays can be edited when the After tab is clicked in the Attributes tab area. Clicking this tab reveals the following items:

After XRay List
This list displays the After XRays that are currently set for the script item. You can modify the contents of the list using the New..., Edit, and Delete buttons.
New...
This button creates a new After XRay and opens the XRay Editor window. If the After XRay is saved, it is added to the list.
Edit
This button opens the XRay Editor window to edit the selected XRay. If the XRay is changed and saved, this change is reflected in the list.
Delete
This button deletes the selected XRay from the list, removing it from the script item.

[Contents | Contact Information]

Last modified 26-MAR-96
Copyright © 1996 Ray Sauers Associates, Inc.